<?php
class  GuaiWu{
    public  $name;
    public  $age;
    public  $bengling;
    /*kang si  zhua ke te*/
    public  function __construct($name,$age,$bengling){
        $this->name=$name;
        $this->age=$age;
        $this->bengling=$bengling;
    }
    public  function  __tostring(){
        return $this->name.$this->age.$this->bengling;
    }
}

$zhubajie=new GuaiWu('猪八戒',36000,'回高老庄');

echo $zhubajie;
